using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class PPBomChangeMap : EntityTypeConfiguration<PPBomChange>
    {
        public PPBomChangeMap()
        {
            // Primary Key
            this.HasKey(t => t.FID);

            // Properties
            this.Property(t => t.FID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FBillNo)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FCheckFlag)
                .IsRequired()
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("PPBomChange");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FClassTypeID).HasColumnName("FClassTypeID");
            this.Property(t => t.FDate).HasColumnName("FDate");
            this.Property(t => t.FBillNo).HasColumnName("FBillNo");
            this.Property(t => t.FBillerID).HasColumnName("FBillerID");
            this.Property(t => t.FCheckDate).HasColumnName("FCheckDate");
            this.Property(t => t.FCheckFlag).HasColumnName("FCheckFlag");
            this.Property(t => t.FCheckerID).HasColumnName("FCheckerID");
            this.Property(t => t.FBillType).HasColumnName("FBillType");
        }
    }
}
